<template>
	<view>
		<view class="title">
			<image :src="info.head_img" mode="aspectFill"></image>
		</view>
		<view class="bodys pg-30">
			<text class="font-32 font-w">{{info.title}}</text>
			<view class="d-flex-yCenter mt-20" @tap='makePhoneCall(info.phone)'>
				<image class="dianhua" src="../static/dianhua.png" mode=""></image>
				<text>{{info.phone}}</text>
			</view>
			<view class="mt-20 mb-30">
				{{adds}}
			</view>
			<view class="dataBox d-flex jfy-sb">
				<view class="">
					<text class="font-30">门店联系人</text>
					<view class="text font-24 mt-20">
						请扫二维码添加门店人员了解米莱产品详情
					</view>
				</view>
				<view class="d-flex flex-d aling-centen jfy-center" @tap='$tool.xiazai(info.wechat_img)'>
					<view class="emImg">
						<image :src="info.wechat_img" class="w-100 h-100" mode=""></image>
					</view>
					<text class="font-24 mt-20">点击保存二维码</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		http_mall_suppliers_view
	} from '@/config/apiRouter.js'
	export default {
		data() {
			return {
				info: {}
			}
		},
		computed: {
			adds() {
				var info = this.info
				return info.province + info.city + info.district + info.address
			}
		},
		onLoad(opens) {
			console.log(opens);
			http_mall_suppliers_view({
				data: {
					id: opens.id
				}
			}).then(res => {
				this.info = res.data
				console.log(res);
			})
		},
		methods: {
			makePhoneCall(e){
				uni.makePhoneCall({
				    phoneNumber: e
				});
			},
		}
	}
</script>

<style lang="scss">
	.title {
		font-size: 0;

		image {
			width: 750rpx;
			height: 360rpx;
		}
	}

	.bodys {
		position: relative;
		top: -10rpx;
		height: 380rpx;
		background: linear-gradient(270deg, #F7D32E, #FFED73);
		border-radius: 12rpx 12rpx 0px 0px;

		.dianhua {
			width: 24rpx;
			height: 24rpx;
		}

		.dataBox {
			width: 690rpx;
			height: 230rpx;
			background: linear-gradient(0deg, #000000, #575757);
			border-radius: 12rpx;
			margin: auto;
			padding: 26rpx;
			color: #fff;

			.text {
				width: 301rpx;
			}

			.emImg {
				width: 150rpx;
				height: 150rpx;
				background: #ACACAC;
				font-size: 0;
			}
		}
	}
</style>
